package cn.yuanqiao.archive.Identify.mapper;/**
 * @author 赵常飞
 * @date 2023/7/10 10:25
 */

import cn.yuanqiao.archive.Identify.domain.TenantYqbgqxjdFolderDa;
import cn.yuanqiao.archive.Identify.domain.TenantYqbgqxjdJob;
import cn.yuanqiao.archive.Identify.domain.TenantYqbgqxjdJobDa;
import cn.yuanqiao.archive.Identify.domain.TenantYqbgqxjdTask;
import cn.yuanqiao.archive.appManager.domain.TenantSysDictData;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 *
 *@AUTHOR:赵常飞
 *@date 2023/7/10 10:25
 */
public interface BgqxIdentifyMapper {
    int createbgqxjdJobTable(@Param("tableName") String tableName);

    int createbgqxjdJobDaTable(@Param("tableName") String tableName);

    int createbgqxjdTask(@Param("tableName")String tableName);

    int createbgqxjdFolderDaTable(@Param("tableName") String tableName);

    int createbgqxjdItemFolderTable(@Param("tableName") String tableName);

    int addtask(TenantYqbgqxjdTask task);

    int addjob(TenantYqbgqxjdJob bgqxjdJob);

    Map<String, Object> getjobinfo(TenantYqbgqxjdJob yqbgqxjdJob);

    int updatejobinfo(TenantYqbgqxjdJob yqbgqxjdJob);

    int insertda(TenantYqbgqxjdJobDa yqbgqxjdJobDa);

    int insertfolderda(TenantYqbgqxjdFolderDa yqbgqxjdFolderDa);

    List<TenantYqbgqxjdJobDa> getyqKfjdJobDabyrenwuid(@Param("renwuid")Long renwuid,@Param("tableName") String tableName);

    int updatetask(TenantYqbgqxjdTask task);

    String getmaxjnjbgqx(@Param("tableName")String tableName,@Param("renwuid") Long renwuid,@Param("jiandingfield")String jiandingfield,@Param("daid") Long daid);

    int shendingtijiao(TenantYqbgqxjdJobDa yqbgqxjdJobDa);

    int shendingtijiaofolderda(TenantYqbgqxjdFolderDa folderDa);

    int updatedatable(TenantYqbgqxjdJobDa jobDa);

    int updatefolderda(TenantYqbgqxjdFolderDa folderDa);

    int updateresult(@Param("maintableName")String maintableName, @Param("mainfield")String mainfield,@Param("subTableName") String subTableName, @Param("subfield")String subfield,@Param("idsql") String idsql,@Param("jobdatable")String jobdatable,@Param("renwuid")String renwuid,@Param("nowdate")String nowdate);

    List<Map<String, Object>> gettongjibyjobname(@Param("hdda")String hdda, @Param("jobtable")String jobtable,@Param("jobdatable") String jobdatable, @Param("folderda")String folderda, @Param("catetable") String catetable,@Param("bgqxs")List<TenantSysDictData> bgqxs);

    List<Map<String, Object>> gettongjibyuserchushen(@Param("hdda")String hdda, @Param("jobtable")String jobtable,@Param("jobdatable") String jobdatable, @Param("folderda")String folderda, @Param("catetable") String catetable,@Param("userid")String userid,@Param("bgqxs")List<TenantSysDictData> bgqxs);

    List<Map<String, Object>> gettongjibyuserfushen(@Param("hdda")String hdda, @Param("jobtable")String jobtable,@Param("jobdatable") String jobdatable, @Param("folderda")String folderda, @Param("catetable") String catetable,@Param("userid")String userid,@Param("bgqxs")List<TenantSysDictData> bgqxs);

    List<Map<String, Object>> gettongjibycate(@Param("hdda")String hdda, @Param("jobtable")String jobtable,@Param("jobdatable") String jobdatable, @Param("folderda")String folderda, @Param("catetable") String catetable,@Param("bgqxs")List<TenantSysDictData> bgqxs);

    List<Map<String, Object>> gettongjibyqzh(@Param("hdda")String hdda, @Param("jobtable")String jobtable,@Param("jobdatable") String jobdatable, @Param("folderda")String folderda, @Param("catetable") String catetable,@Param("bgqxs")List<TenantSysDictData> bgqxs);

    List<Map<String, Object>> exportjobdadata(@Param("renwuid")Long renwuid,@Param("tableName")String tableName, @Param("searchtable")String searchtable, @Param("fields")String fields,@Param("orderstr") String orderstr,@Param("ids") List ids,@Param("dicttable")String dicttable);

    int updatedatable1(TenantYqbgqxjdJobDa jobDa);

    int updatefolderda1(TenantYqbgqxjdFolderDa folderDa);

    int jiandingagin(@Param("maintableName")String maintableName, @Param("mainfield")String mainfield,@Param("subTableName") String subTableName, @Param("subfield")String subfield,@Param("idsql") String idsql);

    List<Map<String,Object>> downloadList(@Param("renwuid")Long renwuid,@Param("tableName") String tableName,@Param("tenantCode")String tenantCode);

    List<Map<String, Object>> executesql(@Param("sql")String sql);
}
